package com.bjpowernode.web.controller;

import com.bjpowernode.api.dto.PlatformInfo;
import com.bjpowernode.web.resp.ResponseObj;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 麦翔盛
 * @ClassName: PlatformController
 * @Package: com.bjpowernode.web.controller
 * @description: 前台界面信息控制类
 * @date 2022/5/14 22:06
 */
@Api(tags = "前台基本信息接口")
@RestController
public class PlatformController extends BaseController{

    /**
     * 获取前台基本信息
     */
    @GetMapping("v1/ylb/baseinfo")
    @ApiOperation(value = "获取前台基本信息",notes = "获取注册用户数，平均利率,投资金额总数")
    @ApiResponses({
            @ApiResponse(code = 200, message = "请求成功", response = ResponseObj.class),
            @ApiResponse(code = 500, message = "服务器内部异常", response = String.class)
    })
    @ApiImplicitParams({

    })
    public ResponseObj showPlatformBaseInfo(){
        PlatformInfo platformInfo = platformService.staticsPlatformDateItems();

        return ResponseObj.ok().content(platformInfo);
    }
}
